<template>
    <div class="home-base">
        <router-view/>
        <div v-if="$route.meta.footer.show" class='common-footer-wrap'>
            <mt-tabbar v-model='home_selected' fixed class="common-footer">
                <!-- <i class='iconfont icon-homepage' /> -->
                <!-- <i class="iconfont icon-youhuiquan" /> -->
                <!-- <i class="iconfont icon-31chanpincanshu" /> -->
                <!-- <i class='iconfont icon-31gouwuche' /> -->
                <!-- <i class='iconfont icon-people' /> -->
                <mt-tab-item class='item-wrap' :class="{'active':$route.name=='HomeIndex'}" id='home_index'><router-link :to="{ name: 'HomeIndex'}" class='item'><img :src="this.$route.name == 'HomeIndex'? require('../../assets/image/index_2.png') : require('../../assets/image/index_1.png')" alt=""><br><span class='text'>首页</span></router-link></mt-tab-item>
<!--                <mt-tab-item class='item-wrap' :class="{'active':$route.name=='HomeGoodsclass'}" id='home_goodsclass'><router-link :to="{ name: 'HomeGoodsclass'}" class='item'><i class="iconfont icon-fenlei" /><span class='text'>分类</span></router-link></mt-tab-item>-->
                <mt-tab-item class='item-wrap' :class="{'active':$route.name=='HomeInformation'}" id='home_goodsclass'><router-link :to="{ name: 'HomeInformation'}" class='item'><img :src="this.$route.name == 'HomeInformation'? require('../../assets/image/information_2.png') : require('../../assets/image/information_1.png')" alt=""><br><span class='text'>资讯</span></router-link></mt-tab-item>
<!--                <mt-tab-item class='item-wrap' :class="{'active':$route.name=='HomeSearch'}" id='home_search'><router-link :to="{ name: 'HomeSearch'}" class='item'><i class="iconfont icon-sousuo1" /><span class='text'>搜索</span></router-link></mt-tab-item>-->
                <mt-tab-item class='item-wrap' :class="{'active':$route.name=='HomeStorage'}" id='home_search' ><div class="item" @click="notice"><img :src="$route.name == 'HomeStorage'? require('../../assets/image/storage_2.png') : require('../../assets/image/storage_1.png')" alt=""><br><span class='text'>仓储</span></div></mt-tab-item>
                <mt-tab-item class='item-wrap' :class="{'active':$route.name=='HomeCart'}" id='home_cart'><router-link :to="{ name: 'HomeCart'}" class='item'><img :src="this.$route.name == 'HomeCart'? require('../../assets/image/cart_2.png') : require('../../assets/image/cart_1.png')" alt=""><br><span class='text'>购物车</span></router-link></mt-tab-item>
                <mt-tab-item class='item-wrap' :class="{'active':$route.name=='MemberIndex'}" id='member_index'><router-link :to="{ name: 'MemberIndex'}" class='item'><img style="margin-bottom:0.2rem" :src="this.$route.name == 'MemberIndex'? require('../../assets/image/member_index_2.png') : require('../../assets/image/member_index_1.png')" alt=""><br><span class='text'>我的</span></router-link></mt-tab-item>
            </mt-tabbar>
        </div>
    </div>
</template>

<script>
import { Toast } from 'mint-ui'
export default {
  name: 'HomeBase',
  data () {
    return {
      home_selected: 'home_index',
        // index_img: this.$route.name == "HomeIndex"? require('../../assets/image/index_2.png') : require('../../assets/image/index_1.png'),
        // information_img: this.$route.name == "HomeInformation"? require('../../assets/image/information_2.png') : require('../../assets/image/information_1.png'),
        // storage_img: this.$route.name == "HomeStorage"? require('../../assets/image/storage_2.png') : require('../../assets/image/storage_1.png'),
        // cart_img: this.$route.name == "HomeCart"? require('../../assets/image/cart_2.png') : require('../../assets/image/cart_1.png'),
        // memberIndex_img: this.$route.name == "MemberIndex"? require('../../assets/image/member_index_2.png') : require('../../assets/image/member_index_1.png'),

    }
  },
  computed: {

  },
  created: function () {
     console.log(12121212666)
  },
    methods: {
        notice(){
            this.$router.push({name: 'HomeStorage'})
            // Toast('敬请期待！')
        }
    }
}
</script>
<style lang="scss" scoped>
    .home-base{
        width: 100vw;
        height: 100vh;
        background: #ffffff;
    }
    div.item img{
        margin: 0.27rem 0;
    }
    img{
        width: 1.2rem;
        margin-top: 0.1rem;
        margin-bottom: 0.15rem;
        // hei;
    }
    // .common-footer-wrap .common-footer{
    //     background-color: red;
    // }
</style>
